* {
    padding: 0;
    margin: 0;
}

#area {
    width: 600px;
    height: 600px;
    background-color: pink;
    margin: 100px auto;
}

#area div {
    width: 30px;
    height: 30px;
    background-color: #CCCCCC;
    float: left;

    box-sizing: border-box;
    border-left: 1px solid #000;
    border-top: 1px solid #000;
}

#area div:nth-last-child(-n+20) {
    border-bottom: 1px solid #000;
}
#area div:nth-child(20n) {
    border-right: 1px solid #000;
}